package com.heima.freemarker.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;

@Controller
public class HelloFreemarkerController {

    @RequestMapping("hello") //thymeleaf
    public String helloFree(Model model){
        //springmvc处理流程ModelAndView
        model.addAttribute("title","人民日报");
        model.addAttribute("name","来到小破站");
        //寻找视图
        return "hello";
    }
}
